	function renameFile(link)
	{
		var name = link.id.substr(7), newname;

		if (newname = prompt('Rename ' + name + ':', name))
		{
			link.href = 'rename/' + name + '/' + newname;

			return true;
		}

		return false;
	}
	function deleteFile(link)
	{
		var name = link.id.substr(7);

		return confirm('Delete ' + name + '?');
	}
	function tableClick(e)
	{
		e = e || window.event;
		var t = e.target || e.srcElement;

		if ((typeof t.cellIndex === 'undefined') || (t.cellIndex >= {{ num_cols }}))
			return;

		window.location.replace('?sort=' + t.cellIndex);
	}
	function columnHighlight(e, highlight)
	{
		e = e || window.event;
		var t = e.target || e.srcElement;

		if ((typeof t.cellIndex === 'undefined') || (t.cellIndex >= {{ num_cols }}))
			return;

		var tableFiles = document.getElementById('tableFiles');

		for (var i = 0, row; row = tableFiles.rows[i]; i++)
			row.cells[t.cellIndex].className = highlight ? 'columnHighlight' : '';
	}